package com.awonsome.admin.boot.service.impl;

import com.awonsome.admin.api.dto.UserAuthDTO;
import com.awonsome.admin.boot.mapper.SysUserMapper;
import com.awonsome.admin.boot.pojo.entity.SysUser;
import com.awonsome.admin.boot.service.ISysUserService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yangdejun
 * @date 2022/1/23 22:18
 */
@Service
@RequiredArgsConstructor
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

    @Override
    public IPage<SysUser> list(Page<SysUser> page, SysUser user) {
        List<SysUser> list = this.baseMapper.list(page, user);
        page.setRecords(list);
        return page;
    }

    @Override
    public boolean saveUser(SysUser user) {
        return false;
    }

    @Override
    public boolean updateUser(SysUser user) {
        return false;
    }

    @Override
    public UserAuthDTO getByUsername(String username) {
        return null;
    }
}
